package mvp.com.bbc.base;

import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

/**
 * Created by Administrator on 2017/9/30.
 */

public abstract class RxJavaObserver<T> implements Subscriber<T> {
    @Override
    public void onSubscribe(Subscription s) {
    }

    @Override
    public void onNext(T t) {
        _onNext(t);
    }


    @Override
    public void onError(Throwable t) {
        _onError(t);
    }

    @Override
    public void onComplete() {

    }

    protected abstract void _onError(Throwable t);

    protected abstract void _onNext(T t);
}
